package com.xlr.excel.config;

import com.xlr.excel.interceptor.TokenHandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;


/**
 *
 * @Auther: xlr
 * @Date: 2018/8/22 14:18
 * @Description:
 */
//@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

	 /**
      *
     * 注册 拦截器
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenHandlerInterceptor()).excludePathPatterns("**/unauth/**").excludePathPatterns("/error");

    }

}
